<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KeywordsList.aspx.cs" Inherits="admin_Keywords_KeywordsList" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>管理热门关键词</title>
    <link rel="stylesheet" href="../skin/Style.css" type="text/css" />

    <script type="text/javascript" src="../../js/jquery.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                操作提示</h3>
        </div>
        <div class="itemtitle_tect">
            <p>
                请输入关键字：<asp:TextBox ID="txtKeyWords" runat="server"></asp:TextBox>
                <asp:DropDownList ID="dropType" runat="server">
                    <asp:ListItem Value="">请选择模块</asp:ListItem>
                    <asp:ListItem Value="Supply">供应信息</asp:ListItem>
                    <asp:ListItem Value="Purchase">求购信息</asp:ListItem>
                    <asp:ListItem Value="SincereAgent">招商加盟</asp:ListItem>
                    <asp:ListItem Value="Expo">展会</asp:ListItem>
                    <asp:ListItem Value="ExpoNews">展会资讯</asp:ListItem>
                    <asp:ListItem Value="Company">公司</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="立即搜索" CssClass="i_button" /></p>
        </div>
        <div class="clr">
        </div>
        <div class="partition">
            <div class="Option">
                <span><strong>快捷操作</strong></span> <span class="pl">
                    <asp:HyperLink ID="lnkAddKeywords" runat="server" NavigateUrl="KeywordsAdd.aspx">新增关键词</asp:HyperLink></span>
            </div>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="grdKeywords" runat="server" AllowPaging="False" AutoGenerateColumns="False"
                DataKeyNames="ID" GridLines="None" OnPageIndexChanging="Keywords_PageIndexChanging"
                OnRowDataBound="Keywords_RowDataBound" CssClass="talbe_list">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle CssClass="nolet" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Name" HeaderText="热词名称" />
                    <asp:TemplateField HeaderText="所属模块">
                        <ItemTemplate>
                            <a href='KeywordsList.aspx?type=<%# Eval("Type") %>'>
                                <%# GetType(Eval("Type").ToString())%>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Count" HeaderText="搜索次数" />
                    <asp:TemplateField HeaderText="推荐">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdate" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")+"|"+DataBinder.Eval(Container.DataItem, "IsCommend") %>'
                                Font-Underline="false" OnCommand="lbtnUpdate_Command" Text='<%# DataBinder.Eval(Container.DataItem, "IsCommend").ToString()== "True" ? "推荐" : "不推荐"%>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <a href='KeywordsEdit.aspx?ID=<%# Eval("ID") %>'>编辑 </a>|
                            <asp:LinkButton CommandName="delete" ID="lnkdelete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'
                                OnCommand="lnkdelete_Command" runat="server" Text="删除" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
            </asp:GridView>
            <asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label>
            <div class="Paging">
                <p>
                    <uc1:PageNo ID="PageNo1" runat="server" />
                </p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />全选
                <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                    Text="批量删除" CssClass="i_button" />
            </div>
        </div>
    </form>
</body>
</html>
